<?php

/**
 * @Author: Eden
 * @Date:   2018-12-25 16:22:26
 * @Last Modified by:   Eden
 * @Last Modified time: 2018-12-25 16:22:47
 */
namespace App\Policies;

use Illuminate\Auth\Access\HandlesAuthorization;

class Policy
{
    use HandlesAuthorization;

    public function before($user, $ability)
    {
        // 如果用户拥有管理内容的权限的话，即授权通过
        if ($user->can('manage_contents')) {
            return true;
        }
    }
}
